﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL.Entity;
using DAL.Persistencia;

namespace NewTierra.Pages.Cliente
{
    public partial class VerTodosClientes : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PopularGridClientes();
            }
        }

        #region Regras

        protected void PopularGridClientes()
        {
            try
            {
                ClienteDAL cd = new ClienteDAL();

                GridListClientes.DataSource = cd.ListarTodos();
                GridListClientes.DataBind();

            }
            catch (Exception ex)
            {
                lblMsgListClientes.Text = ex.Message;
            }
        }

        #endregion

    }
}